
void main() {
  Phone redmi10Pro = new XiaoMi();
  Phone huweiP70Pro = new Huawei();
  redmi10Pro.camera();
  redmi10Pro.factoryInfo();
  huweiP70Pro.camera();
  huweiP70Pro.factoryInfo();
}

abstract class Phone {
  void processor();
  void camera();
  
  void factoryInfo() {
    print("factoryInfo: 主机厂");
  }
}

class XiaoMi extends Phone {

  @override
  void processor() {
    // TODO: implement processor
    print("骁龙855");
  }

  @override
  void camera() {
    // TODO: implement camera
    print("SAMSUNG");
  }
}

class Huawei extends Phone {

  @override
  void processor() {
    // TODO: implement processor
    print("麒麟990");
  }

  @override
  void camera() {
    // TODO: implement camera
    print("莱卡");
  }
}


